package com.zyf.pattern.prototype.simple;

import java.util.ArrayList;

/**
 * 实现Cloneable，官方推荐做法
 * create by yifeng
 */
public class Prototype implements Cloneable{
    public String name;

    public ArrayList<String> list;

    /**
     * 浅复制
     * @return
     * @throws CloneNotSupportedException
     */
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
